package state;

import model.*;

public class MaterialListCached extends AtLeastMaterialListCached {
	
	public static MaterialListCached create (Product product, MaterialList materialList){
		return new MaterialListCached(product, materialList);
	}


	private MaterialListCached (Product product, MaterialList materialList){
		super(product, materialList);
	}


	
	public int getOverallPrice() {
		int overallPrice = super.getProduct().calculatePrice();
		super.getProduct().setCurrentState(OverallPriceAndMaterialListCached.create(super.getProduct(),super.getMaterialList(),overallPrice));
		return overallPrice;
	}


	
	public void priceChange() {
		;
	}


}
